<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="" />
    <meta name="author" content="ChongMing" />
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="full-screen" content="yes">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-fullscreen" content="true">
    <meta name="360-fullscreen" content="true">
    <title>发表评论</title>
</head>
<link rel="stylesheet" href="../css/framework7.ios.min.css">
<link rel="stylesheet" href="../css/framework7.ios.colors.min.css">
<link rel="stylesheet" href="../css/my-app.css">
<link rel="stylesheet" href="../css/reset.css">
<link rel="stylesheet" href="css/consultation.css">
<link type="text/css" rel="stylesheet" href="css/index.css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" src="../js/framework7.min.js"></script>
<script type="text/javascript" src="../js/my-app.js"></script>
<script type="text/javascript" src="js/consultation.js"></script>
<script type="text/javascript" src="../js/jquery.cookie.js"></script>
<script>
    $(function(){
        var  order_id = consultationinterface.getQueryString('order_id');
        //    发表评论star评分
        $('.publish-comment .score .con .public .star img, .publish-comment .score .con .public .attitude img').click(function(){
            var index = $(this).index();
            $(this).parent().attr('data-num',index+1)
            $(this).attr('src','images/icon15.png').prevAll().attr('src','images/icon15.png');
            $(this).nextAll().attr('src','images/icon14.png');


        });
        $('.publish-comment .submit').click(function(){
            var review_content = $('.publish-comment .content textarea').val();
            var disease = $('.publish-comment .content .illness input').val();
            var effect = $('.publish-comment .score .con .public .star').attr('data-num');
            var attitude = $('.publish-comment .score .con .public .attitude').attr('data-num');
            if(disease==''){
                consultationinterface.layer('请输入疾病名称');
            }else if(review_content==''){
                consultationinterface.layer('请输入要评论的内容');
            }else{
                var sub_commentdata = {};
                sub_commentdata.order_id = order_id;
                sub_commentdata.review_content = review_content;
                sub_commentdata.disease = disease;
                sub_commentdata.effect = effect;
                sub_commentdata.attitude = attitude;
                sub_commentdata.uid = $.cookie("local_userId");
                console.log(sub_commentdata)
//                alert(sub_commentdata)
                consultationinterface.sub_comment(sub_commentdata);
            }
        });
    });
</script>
<body style=" background: #ebebeb;  margin: auto;-webkit-overflow-scrolling: touch;overflow: scroll;">
<div class="publish-comment">
    <div class="content">
        <div class="illness">
            <label>疾病名称:</label>
            <input type="text" placeholder="请输入疾病名称">
        </div>
        <textarea placeholder="对医生想要说的话"></textarea>
        <!--<p class="number">0/15</p>-->
    </div>
    <div class="score">
        <p class="tit">整体评分<b>（评价完成会获得10元优惠劵，3月内有效）</b></p>
        <div class="con">
            <div class="effect public">
                <p>治疗效果</p>
                <div class="star" data-num="5">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                </div>
            </div>
            <div class="effect public">
                <p>治疗态度</p>
                <div class="attitude" data-num="5">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                    <img src="images/icon15.png">
                </div>
            </div>
        </div>
    </div>
    <button class="submit">提交评论</button>
</div>
</body>
</html>